using Admin.Application.Repositories;
using Admin.Application.Services;
using Admin.Infrastructure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Admin.Application;

public static class ServiceCollectionExtension
{
    public static IServiceCollection AddAdminApplication(this IServiceCollection services, IConfiguration configuration)
    {
        services.AddAdminInfrastructure(configuration);
        services.AddScoped<IAuthService, AuthService>();
        services.AddScoped<IDepartmentService, DepartmentService>();
        services.AddScoped<IUserService, UserService>();
        services.AddScoped<IRoleService, RoleService>();
        services.AddScoped<IPermissionService, PermissionService>();
        return services;
    }
}